package com.company.ems.dto;

public class EmployeeQueryDTO {
    private String name;
    private String department;
    private String position;
    private Integer page = 1;
    private Integer pageSize = 10;

    // 无参构造方法
    public EmployeeQueryDTO() {
    }

    // 全参构造方法
    public EmployeeQueryDTO(String name, String department, String position, Integer page, Integer pageSize) {
        this.name = name;
        this.department = department;
        this.position = position;
        this.page = page;
        this.pageSize = pageSize;
    }

    // Getter和Setter方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getOffset() {
        return (page - 1) * pageSize;
    }
}